package com.sxbbc.common.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sxbbc.common.basics.utils.statics.StaticUtils;
import com.sxbbc.common.core.entity.jz.SysMenus;
import com.sxbbc.common.core.mapper.jz.SysMenusMapper;
import com.sxbbc.common.core.service.ISysMenusService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 平台菜单表 服务实现类
 * </p>
 *
 * @author arno
 * @since 2019-04-26
 */
@Service
public class SysMenusServiceImpl extends ServiceImpl<SysMenusMapper, SysMenus> implements ISysMenusService {

    @Override
    public List<SysMenus> queryMenusList(QueryWrapper<SysMenus> wrapper) {
        if (wrapper == null) {
            wrapper = new QueryWrapper<SysMenus>();
        }
        wrapper.eq("status", StaticUtils.STATUS_YES);
        wrapper.orderByAsc("sort");
        return super.list(wrapper);
    }
}
